fix(jobs): give the bulk bar separate retry and discard all-matching buttons - #2
Merged
Conversation
…buttons The failed-jobs selection bar is a single form posting to the bulk retry endpoint, with "Discard selected" overriding the target via formaction. The neutral "or apply to all N matching" button carried no formaction, so it inherited the form action and always retried — there was no way to discard all matching from the bulk bar, and clicking it after intending a discard silently retried every matching job. Split it into explicit "Retry all" and "Discard all" buttons, the latter carrying the discard formaction and a destructive confirm. Both keep scope=all so the server re-runs the filter rather than trusting posted ids. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bulk_retry_jobs_path; "Discard selected" overrides the target withformaction. The neutral "or apply to all N matching" button carried noformaction, so it inherited the form action and always retried — discarding all matching was unreachable from the bulk bar, and clicking it after intending a discard silently retried every matching job.Retry allandDiscard allbuttons inapp/views/flightdeck/jobs/_list.html.erb, the latter carrying the discardformactionand a destructive confirm. Both keepname="scope" value="all"soActionsController#act_on_all_matchingre-runs the filter server-side rather than trusting posted ids..fd-bulkbar-alllabel style for the new "or all N matching:" prefix, and rebuilt the committed CSS digest (rake assets:build)./jobs/discard, and that exactly one of the twoscope=allbuttons falls through to the form's retry action.No controller changes:
RetriesControllerandDiscardsControllerwere already correctly separated — this was purely a markup wiring bug.Testing
bin/test— asset freshness plus the fast suite in both host modes (262 runs, 971 assertions, 0 failures each)bundle exec rubocop— 85 files, no offensesbundle exec rake assets:build— CSS/JS rebuilt and committedbin/demoon the seeded dummy app: verified the two buttons render and target the retry and discard endpoints respectively